<div class="bg-light lter b-b wrapper-md">
    <h4 class="m-n font-thin">商家入驻积分信息</h4>
</div>
<div class="wrapper-md ng-scope" ng-controller="shopLocatedIntegralCtrl">
    <div class="panel">
        <div class="row wrapper">
            <div class="col-sm-12">
                <form class="form-inline">
                    <div class="form-group">
                        <label class="control-label">用户名称</label>
                        <input type="text" class="input-sm form-control" ng-model="shopLocatedIntegralVO.userName">
                    </div>
                    <button class="btn btn-sm btn-info" ng-click="findPageAll()">查询</button>
                </form>
            </div>
            <div class="clearfix"></div>
        </div>
        <div class="table-responsive">
            <table class="table table-striped b-t b-light">
                <thead>
                    <tr>
                        <th>用户名称</th>
                        <th>推荐用户</th>
                        <th>积分占比</th>
                        <th>返回积分</th>
                        <th>支付金额</th>
                        <th>入驻店铺</th>
                        <th>联系信息</th>
                        <th>入驻步骤</th>
                        <th>状态</th>
                        <th>创建时间</th>
                        <th width="200"> 操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="item in list">
                        <td>{{item.userName}}</td>
                        <td> {{item.inviterName}}</td>
                        <td> {{item.inviterIntegralRatio}}</td>
                        <td> {{item.returnIntegral | number:4}}</td>
                        <td> {{item.payMoney}}</td>
                        <td>
                            <p class="block h5 font-bold m-b-xs w-sm text-ellipsis">{{item.shopName}}</p>
                            <p>{{item.provinceName}} {{item.cityName}} {{item.countyName}} {{item.address}}</p>
                        </td>
                        <td>
                            {{item.linkman}}<br>
                            {{item.mobilePhone}}
                        </td>
                        <td>
                            <span class="badge bg-info" ng-if="item.registStatus==0">已选择套餐</span>
                            <span class="badge bg-warning" ng-if="item.registStatus==1">已注册基本信息</span>
                            <span class="badge bg-danger" ng-if="item.registStatus==2">已填写店铺信息</span>
                            <span class="badge bg-primary" ng-if="item.registStatus==3">提交完整信息</span>
                            <span class="badge bg-success" ng-if="item.registStatus==4">审核通过</span>
                            <span class="badge bg-dark" ng-if="item.registStatus==5">审核不通过</span>
                        </td>
                       
                        <td>
                            <span class="badge bg-info" ng-if="item.status == 0">暂未发放积分</span>
                            <div>
                                <span class="badge bg-warning" ng-if="item.status == 1">已发放积分</span>
                                <span class="badge bg-warning" ng-if="item.returnType == 0">现金分</span>
                                <span class="badge bg-warning" ng-if="item.returnType == 1">收益分</span>
                                <span class="badge bg-warning" ng-if="item.returnType == 2">乐积分</span>
                            </div>
                        </td>
                        <td>
                            {{item.createdTime}}
                        </td>
                        <td>
                            <span ng-if="item.status == 1" class="text-muted">已发放积分</span>
                            <div class="btn-group dropdown" dropdown="" ng-if="item.status == 0">
                                <button class="btn btn-sm btn-default" dropdown-toggle="" aria-haspopup="true" aria-expanded="false">发放积分 <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu">
                                    <li><a ng-click="returnIntegral(item.id,0)">现金分</a></li>
                                    <li><a ng-click="returnIntegral(item.id,1)">收益分</a></li>
                                    <li><a ng-click="returnIntegral(item.id,2)">乐积分</a></li>
                                </ul>
                            </div>
                        </td>
                        
                    </tr>
                </tbody>
            </table>
            <div ng-if="list.length<=0 && !app.loading" class="padder-v text-center">
                <span class="h6">~未搜索到任何数据~</span>
            </div>
            <div>
                <circle-loading ng-if="app.loading"></circle-loading>
            </div>
        </div>
        <footer class="panel-footer">
            <div class="row">
                <div class="col-sm-offset-4 col-sm-4 text-center">
                    <small class="text-muted inline m-t-sm m-b-sm">显示第 {{startRow}} 至 {{endRow}} 项结果，共 {{totalItems}} 项</small>
                </div>
                <div class="col-sm-4 text-right text-center-xs">
                    <pagination boundary-links="true" total-items="totalItems" ng-model="currentPage"
                                ng-change="pageChanged()" max-size="{{maxPageRow}}" class="pagination-sm m-t-none m-b"
                                previous-text="上一页" next-text="下一页"
                                first-text="首页" last-text="尾页"></pagination>
                </div>
            </div>
        </footer>
    </div>
</div>


